from django.db import models


class Task(models.Model):
    task_uid = models.UUIDField(verbose_name='任务id', unique=True)
    task_name = models.CharField(max_length=64, verbose_name='任务名称', db_index=True)
    task_time = models.DateTimeField(auto_now=True, verbose_name='任务执行时间')
    task_desc = models.TextField(verbose_name='任务描述')

    class Meta:
        db_table = 'task'
        verbose_name_plural = '任务表'

    def __str__(self):
        return self.task_name

